package com.solution.admin.customer.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.customer.dao.CustomerLevelDao;
import com.solution.admin.customer.entity.CustomerLevelEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 客户级别配置DAO实现
 * @author solin
 * @date 2017-09-16 23:50:59
 */
@Repository
public class CustomerLevelDaoImpl extends BaseDaoImpl<CustomerLevelEntity> implements CustomerLevelDao {

	/**
	 * 保存客户级别配置信息
	 * @param ebCustomerLevelEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:50:59
	 */
	@Override
	public long saveEbCustomerLevel(CustomerLevelEntity ebCustomerLevelEntity) {
		return super.insert(ebCustomerLevelEntity);
	}

	/**
	 * 分页查询客户级别配置信息
	 * @param pageParam 分页对象
	 * @param ebCustomerLevel 分页参数
	 * @return PageBean 分页参数及数据
	 * @author solin
	 * @date 2017-09-16 23:50:59
	 */
	public PageBean listEbCustomerLevelPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新客户级别配置
	 * @param ebCustomerLevelEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:50:59
	 */
	@Override
	public int updateEbCustomerLevel(CustomerLevelEntity ebCustomerLevelEntity) {
		return super.update(ebCustomerLevelEntity);
	}

	/**
	 * 删除客户级别配置
	 * @param ebCustomerLevelId
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:50:59
	 */
	public int deleteEbCustomerLevelById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询客户级别配置
	 * @param param
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:50:59
	 */
	@Override
	public List<CustomerLevelEntity> listEbCustomerLevel( Map<String, Object> param) {
		return super.listBy(param);
	}
}
